package com.ssy.oppo.controller;

import com.ssy.oppo.model.pojo.Good;
import com.ssy.oppo.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @author: 苏少有的idea
 * @date:   2021/11/24
 * @description 查看所有商品控制器
 */
@RestController
public class GoodController {
    @Autowired
    GoodService goodService;
    @GetMapping("/good")
    public List<Good> toAllGood(){
//        List<Good> list =goodService.selectAllGood();
        return  goodService.selectAllGood();
    }
}
